This was missed in commit
7ca418a79a. As we are dealing with
non-\0-terminated data here, go through GBytes this time.
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/189
try {
data = this._dataStdout.peek_buffer();
- keyfile.load_from_data(data.toString(), data.length,
- GLib.KeyFileFlags.NONE);
+ if (data instanceof Uint8Array)
+ data = imports.byteArray.toGBytes(data);
+ else
+ data = data.toGBytes();
+
+ keyfile.load_from_bytes(data, GLib.KeyFileFlags.NONE);
if (keyfile.get_integer(VPN_UI_GROUP, 'Version') != 2)
throw new Error('Invalid plugin keyfile version, is %d');